package com.pw.study.flink.sink

import com.pw.study.flink.entities.UserBean
import com.pw.study.flink.source.CustomSource
import org.apache.flink.streaming.api.scala._

object JdbcSK {
  def main(args: Array[String]): Unit = {
    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment
    env.setParallelism(2)
    val ds: DataStream[UserBean] = env.addSource(new CustomSource())
    ds.addSink(new MyJdbcSink())
    env.execute()
  }
}
